package com.mapbased.wfw.bind;

import com.mapbased.wfw.*;

/**
 *
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: mapbased.com</p>
 *
 * @author chy(Baily)
 * @version 1.0
 */

public class RequestBinding
    extends AbstractBinding
{

    public RequestBinding(String exp)
    {
        super(exp);

    }

    /**
     * getValue
     *
     * @param context RenderContext
     * @return Object
     * @todo Implement this com.mapbased.wfw.Binding method
     */
    protected Object getDirectValue(RenderContext context)
    {
        Object o=context.getRequestMap().get(this.attributeName);
        if(o instanceof String[])
        {
            String[] ss=(String[])o;
            if(ss.length == 1)
            {
                return ss[0];
            }
        }
        return o;
    }

}
